package com.example.springbootdemo.importpkg;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Import;

@SpringBootApplication
@Import(CustomImportBeanDefinitionRegister.class)
public class ImportDemo {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(ImportDemo.class, args);

        String customBean = (String) applicationContext.getBean("customBean");
        System.out.println(customBean);
    }
}
